#include <opencv2/opencv.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, char** argv) {
    if (argc != 2) {
        cout << "Usage: " << argv[0] << " <image_path>" << endl;
        return -1;
    }

    Mat src = imread(argv[1], IMREAD_COLOR);
    if (src.empty()) {
        cout << "图片加载失败！" << endl;
        return -1;
    }

    namedWindow("Display window", WINDOW_AUTOSIZE);

    imshow("Display window", src);

    waitKey(0);

    destroyAllWindows();

    return 0;
}
